//
//  UIImage+Extension.m
//  KXTV
//
//  Created by 徐诗龙 on 16/8/13.
//  Copyright © 2016年 ETOP. All rights reserved.
//

#import "UIImage+Extension.h"

@implementation UIImage (Extension)
+ (UIImage *)createImageWithColor:(UIColor *)color
{
    CGRect rect = CGRectMake(0.0f,0.0f,1.0f,1.0f);
    UIGraphicsBeginImageContext(rect.size);
    CGContextRef context =UIGraphicsGetCurrentContext();
    CGContextSetFillColorWithColor(context, [color CGColor]);
    CGContextFillRect(context, rect);
    UIImage *myImage =UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    return myImage;
}


+ (UIImage *)imageWithArcStr:(NSString *)str{
    NSString *path = [[NSBundle mainBundle] pathForResource:str ofType:nil];
    UIImage *image = [UIImage imageWithContentsOfFile:path];
    return image;
}


@end
